-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: e2e tests #343
test: e2e tests #343
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, amazing PR. There are a few nits below to be cleaned up. Also if we could add a brief description to the PR saying what was added changed etc.
Co-authored-by: Tarik Gul <[email protected]>
Co-authored-by: Tarik Gul <[email protected]>
Co-authored-by: Tarik Gul <[email protected]>
Co-authored-by: Tarik Gul <[email protected]>
Co-authored-by: Tarik Gul <[email protected]>
Co-authored-by: Tarik Gul <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Amazing job!
Description
These are E2E tests that run using zombienet and the scripts located in the
.\scripts\
folder. The goal of these tests is to build asset transfers using the ATA and submit them, and then checking for the success of these transfers.Layout
The files necessary to run the tests are located in the
.'e2e\
directory, with the exception of the setup scripts that are located on.\scripts\
.The tests are located in the
.\e2e\tests\
folder. It contains the functions for theforeign-assets
.assets
,balances
andpool-assets
tests, The tests parameters are defined in the.\e2e\tests\index.ts
file, as aTestGroups
implementation, which is an interface groupingIndividualTest
implementations. EachIndividualTest
consists of the name of the test to be run, the args to be passed to the test, and the verification data to check the success of the transfer.The file
.\e2e\balance.ts
contains the functionbalanceTracker
which handles the storing of the inital and final balances of an account for certain assetIds as anIBalance
instance. This data is later used by the verificator to check the success of the transfer.The file
.\e2e\verification.ts
contains the functionverification
which takes an instance ofIBalance
corresponding to the transfer's destination account, the assetIds and the amounts transferred and checks that the transferred amounts correlate with the destination account's final balance.The file
.\e2e\logger.ts
contains functions tasked with displaying the evolution of the tests in a nice way.The file
.\e2e\ consts.ts
contains constants that are used during the tests.The file
.\e2e\executor.ts
handles the execution of the tests, retrieving the cli arguments that specify which particular test is being run, and retrieving the necessary data from the.\e2e\tests\index.ts
file in order to run the test and verify its correct completion.The tests also rely on two shell scripts,
.\e2e\zombienet.sh
and.\e2e\tests.sh
. The former determines which OS the program is being run on, modifies the name of the zombienet executable accordingly and runs the zombienet. The latter handles the execution of the test itself, by determining which script is needed to run and running the corresponding setup script first and the corresponding test later.Other changes
ChargeTransactionPayment
byChargeAssetTxPayment
to prevent compatibility issues with latest versions.ROCOCO_ASSET_HUB_SPEC_NAME
tosrc/registry/Registry.ts
so that it is recognized as aSystemChain
.Closes #311